Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] configure loglevel for salt and python #619

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mcalmer
Copy link
Contributor

@mcalmer mcalmer commented Oct 9, 2019

Warning

In most cases, it is not enough if you modify the terraform modules at modules/libvirt. Check if you also need changes at modules/openstack and modules/aws.

What does this PR change?

Configure logging and loglevel via main.tf .

As of now for salt and python backend.

@mcalmer
Copy link
Contributor Author

mcalmer commented Oct 9, 2019

Still need a good idea how to configure log4j.properties for tomcat and taskomatic

@moio
Copy link
Contributor

moio commented Feb 18, 2020

I think best would be to allow for a new parameter which is a map from log level to class or package names. It can be passed as-is via grains, then salt should pick it up and calculate lines to add to log4j.conf.

Example:

java_logging = {
 "DEBUG" : ["com.suse.manager.tasks, com.suse.manager.reactor.PGEventListener"],
 "INFO" : ["com.redhat.rhn.frontend.action.LoginAction"],
}

Should result in:

log4j.logger.com.redhat.rhn.frontend.action.LoginAction=INFO
log4j.logger.com.suse.manager.tasks=DEBUG
log4j.logger.com.suse.manager.reactor.PGEventListener=DEBUG 

(log4j.logger. is prepended and =LEVEL is appended)

Note that the log4.conf file should be extracted from rhn.jar (by default it does not exist) and then new lines should be added. The result should be copied in /srv/tomcat/webapps/rhn/WEB-INF/classes/log4j.properties (for Tomcat), /usr/share/rhn/classes/log4j.properties (for Taskomatic) and usr/share/rhn/search/classes/log4j.properties (for Search). Parent directories might be missing.

Any plans to finish this PR? :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants